package com.boot.result;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    private int code;
    private String msg;
    private Object data;

    public static Result success() {
        return new Result(200, "success", null);
    }
    public static Result success(Object data) {
        return new Result(200, "success", data);
    }

    public static  Result build(Object data,int code,String msg) {
        return new Result(code,msg,data);
    }
}
